<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>javascript 阶段</title>
</head>

<body>


    <script>
        // var option = { width: 500, height: 300, margin: 200 };
        var option = { width: "500px", height:"300px", margin: "200px" };
        for (var prop in option) {
            console.log(prop); // width height margin
            // console.log(option.prop); // undefined undefined undefined
            // console.log(option[prop]);// 500 300 200
            // console.log(parseInt(option[prop]));// 500 300 200
        }

    </script>
</body>

</html>